import query from '@dfeidao/atom-nodejs/db/query';
import { IncomingHttpHeaders } from 'http';
import { productid, systemid } from '../../atom/config';
// 初始化查询第二表的数据

interface Message {
    filter: {
		staff_no: string
	};
}
export default async function atom(message: Message, action_id: string, session_id: string, headers: IncomingHttpHeaders) {
	const p = query(action_id, session_id, systemid);
    p.prepare('project_personnel', ['project_no', 'project_name','is_resident','pub_user_no'], { productid,pub_user_no:{$in:message.filter.staff_no}}, 20,  1, [], []);
	const [dt] = await p.exec();
	return {dt};
}
